package com.wgy.day16.Arrays;

import java.util.Arrays;

/**
 * Created by pc on 2020/11/11 23:42
 * Description: LearningJava
 */
public class Demo02ArraysPractise {
    public static void main(String[] args) {
        String str = "ah91kjlnaoo715nklfla4";
        char[] array = str.toCharArray();//先转换成数组
        Arrays.sort(array);            //在用数组进行Arrays.sort()的升序排列
        for (int i = array.length - 1; i >= 0; i--) {  //最后在倒叙遍历数组
            System.out.print(array[i]);
        }
    }

}
